package br.com.sistema.util;

import br.com.sistema.views.Caption;

import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Panel;

public class Toolbar extends Panel {

	private static final long serialVersionUID = 1L;


	//private Button pesquisa = new Button();
	private Button pesquisa = new Button(Caption.ABRE_PESQUISA);
	private Button insere = new Button(Caption.INSERE);
	private Button altera = new Button(Caption.ALTERA);
	private Button remove = new Button(Caption.REMOVE);
	
	public Toolbar(){
		
		//pesquisa.setIcon(new ThemeResource("icons/funnel.png"));
		//pesquisa.setStyleName(BaseTheme.BUTTON_LINK);
		/*insere.setIcon(new ThemeResource("icons/application_add.png"));
		altera.setIcon(new ThemeResource("icons/application_edit.png"));
		remove.setIcon(new ThemeResource("icons/application_delete.png"));
		
		
		insere.setStyleName(BaseTheme.BUTTON_LINK);
		altera.setStyleName(BaseTheme.BUTTON_LINK);
		remove.setStyleName(BaseTheme.BUTTON_LINK);*/
		
		HorizontalLayout h = new HorizontalLayout();
		h.setMargin(true);
		h.setSpacing(true);
		h.addComponent(pesquisa);
		h.addComponent(insere);
		h.addComponent(altera);
		h.addComponent(remove);

		insere.setVisible(false);
		altera.setVisible(false);
		remove.setVisible(false);
		
		setContent(h);
	}

	public Button getPesquisa() {
		return pesquisa;
	}

	public Button getInsere() {
		return insere;
	}

	public Button getAltera() {
		return altera;
	}

	public Button getRemove() {
		return remove;
	}
	
	
	
}
